MPIMapViewInterface

interface MPIMapViewInterface

This class contains methods that help to display and interact with a Mappedin venue

Functions

Link copied to clipboard
abstract fun addInteractivePolygon(polygon: MPINavigatable.MPIPolygon)
abstract fun addInteractivePolygon(polygonId: String)

Adds an interactive polygon (allows it to be clickable)

Link copied to clipboard
abstract suspend fun clearAllPolygonColors()
abstract fun clearAllPolygonColors(completionCallback: (MPIError?) -> Unit?)

Clears color on all polygons

Link copied to clipboard
abstract fun createMarker(    coordinate: MPIMap.MPICoordinate,     contentHtml: String,     markerOptions: MPIOptions.Marker = MPIOptions.Marker()): String

Creates a marker on a MPINavigatable.MPICoordinate

abstract fun createMarker(    node: MPINavigatable.MPINode,     contentHtml: String,     markerOptions: MPIOptions.Marker = MPIOptions.Marker()): String

Creates a marker on a MPINavigatable.MPINode

Link copied to clipboard
abstract fun drawPath(path: List<MPINavigatable.MPINode>, pathOptions: MPIOptions.Path? = null)

Draws a path on the MPIMapView

Link copied to clipboard
abstract fun focusOn(focusOptions: MPIOptions.Focus)

Focus on a list of nodes and/or polygons provided in the focus options

Link copied to clipboard
abstract suspend fun getDirections(    to: MPIDestinationSet,     from: MPINavigatable,     accessible: Boolean = true): List<MPIDirections>
abstract fun getDirections(    to: MPIDestinationSet,     from: MPINavigatable,     accessible: Boolean = true,     directionsCallback: (List<MPIDirections>?) -> Unit)
abstract suspend fun getDirections(    to: MPINavigatable,     from: MPINavigatable,     accessible: Boolean = true): MPIDirections
abstract fun getDirections(    to: MPINavigatable,     from: MPINavigatable,     accessible: Boolean = true,     directionsCallback: (MPIDirections?) -> Unit)
Link copied to clipboard
abstract suspend fun getNearestNodeByScreenCoordinates(    x: Int,     y: Int,     map: MPIMap? = null): MPINavigatable.MPINode
abstract fun getNearestNodeByScreenCoordinates(    x: Int,     y: Int,     map: MPIMap? = null,     nearestNodeCallback: (MPINavigatable.MPINode?) -> Unit)

Gets the nearest node by screen coordinates

Link copied to clipboard
abstract fun labelAllLocations(options: MPIOptions.FlatLabelAllLocations? = null)
abstract fun labelAllLocations(options: MPIOptions.FloatingLabelAllLocations? = null)

Label all polygons with locations either loaded via the API or passed in

Link copied to clipboard
abstract fun labelPolygon(polygon: MPINavigatable.MPIPolygon, options: MPIOptions.FlatLabel)
abstract fun labelPolygon(polygonId: String, options: MPIOptions.FlatLabel)

Sets a flat label for MPINavigatable.MPIPolygon

abstract fun labelPolygon(polygon: MPINavigatable.MPIPolygon, options: MPIOptions.FloatingLabel)
abstract fun labelPolygon(polygonId: String, options: MPIOptions.FloatingLabel)

Sets a floating label for MPINavigatable.MPIPolygon

Link copied to clipboard
abstract fun loadVenue(    options: MPIOptions.Init,     showVenueOptions: MPIOptions.ShowVenue? = null,     errorCallback: (MPIError?) -> Unit?)

Loads the venue based on the options passed in MPIMapView

Link copied to clipboard
abstract fun removeAllLabels()

Removes all labels

Link copied to clipboard
abstract suspend fun removeAllPaths()
abstract fun removeAllPaths(completionCallback: (MPIError?) -> Unit?)

Remove all paths on the MPIMapView

Link copied to clipboard
abstract fun removeMarker(markerId: String)

Removes a marker from a MPINavigatable.MPINode

Link copied to clipboard
abstract suspend fun setMap(map: MPIMap)
abstract suspend fun setMap(mapId: String)
abstract fun setMap(map: MPIMap, completionCallback: (MPIError?) -> Unit?)
abstract fun setMap(mapId: String, completionCallback: (MPIError?) -> Unit?)

Sets the MPIMap of the MPIMapView

Link copied to clipboard
abstract fun setPolygonColor(    polygon: MPINavigatable.MPIPolygon,     color: String,     textColor: String? = null,     opacity: Double = 1.0)
abstract fun setPolygonColor(    polygonId: String,     color: String,     textColor: String? = null,     opacity: Double = 1.0)

Sets the color of the MPINavigatable.MPIPolygon

Link copied to clipboard
abstract fun showVenue(    venueResponse: MPIVenueResponse,     showVenueOptions: MPIOptions.ShowVenue? = null,     errorCallback: (MPIError?) -> Unit?)
abstract fun showVenue(    venueResponse: String,     showVenueOptions: MPIOptions.ShowVenue? = null,     errorCallback: (MPIError?) -> Unit?)

Shows the venue based on the venue data and options passed in MPIMapView

Inheritors

Link copied to clipboard